package club.sanmubird.travel_culture_wx_demo.demo.mongodb.service;

import club.sanmubird.travel_culture_wx_demo.demo.mongodb.entity.Student;
import club.sanmubird.travel_culture_wx_demo.demo.mongodb.dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: springboot-simpleMongDb
 * @description: studentService
 * @author: sam
 * @create: 2018-07-18 23:50
 * @update: 2018-07-18 23:50
 * @update: Sam
 **/
@Service
public class StudentService {

	@Autowired
	StudentDao studentDao;

	public List<Student> getAllStudents() {
//		Student stu = new Student("张三丰", 28, "男", "习武");
//		Key k = studentDao.create(stu);
		return studentDao.getAllStudents();

	}
}
